<template>
  <div class="apply-dialog">
    <el-dialog
      title=""
      :visible.sync="dialogVisible"
      :fullscreen="true"
      :before-close="handleClose"
      :close-on-click-modal="false"
      :show-close="false"
    >
      <LimitTech ref="LimitTech" @showTech="openTech" />
      <Tech ref="Tech" @showLimit="openHelp" />
      <div slot="title" class="flex flex-row align-center justify-content-end">
        <div class="btn-list flex flex-row align-center">
          <el-button
            type="warning"
            size="mini"
            :disabled="draftDisabled"
            @click="draftAction"
          >
            暂存
          </el-button>

          <!-- <el-button
            v-if="workOrdeInfo.id > 0 && workOrdeInfo.status == 0"
            type="warning"
            size="mini"
            @click="recallOrder()"
            :disabled="recallDisabled"
          >
            撤回
          </el-button> -->
          <el-button
            type="primary"
            size="mini"
            :disabled="submitDisabled"
            @click="submitAction"
          >
            提交
          </el-button>
          <!-- <el-button type="primary" size="mini" @click="handlePrint(printData)">
            导出PDF
          </el-button> -->

<!--          <div class="pl15 pr15">
            上报人：<span class="primary-color">{{ name }}</span>
          </div>
          <div class="pl15 pr15">
            最新状态：<span class="primary-color">{{ orderState }}</span>
          </div>-->
          <div class="ml50" @click="handleClose">
            <i class="el-icon-close cursor-p font22 line-height-32" />
          </div>
        </div>
      </div>
      <div class="app-container">
        <el-form
          ref="ruleForm"
          :model="ruleForm"
          :rules="rules"
          label-width="120px"
          class="mb5"
        />
        <div v-if="dialogVisible" id="printFrom" class="text item">

          <el-card
            class="box-card apply-box mt10 mb20"
          >
            <div slot="header" class="clearfix flex flex-row align-center">
              <div class="line" />
              <span class="font18 ml10 flex-auto">申报者</span>
              <el-button
                id="no-print"
                type="danger"
                round
                icon="el-icon-thumb"
                size="small"
                @click="openHelp"
              >申报指引</el-button>
            </div>
            <el-form
              ref="generateForm"
              label-suffix=":"
              size="small"
              :model="models"
              :rules="rules"
              label-position="right"
              label-width="100px"
            >
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="项目名称"
                    prop="name"
                    label-width="130px"
                  >
                    <el-input
                      :style="{width:'100%'}"
                      placeholder="请输入项目名称"
                      v-model="models.name"
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="项目编号"
                    prop="projectNo"
                  >
                    <el-input
                      :style="{width:'100%'}"
                      placeholder="请输入项目编号"
                      v-model="models.projectNo"
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="项目分类"
                    prop="projectClass"
                    label-width="130px"
                  >
                    <el-select
                      :style="{width:'100%'}"
                      placeholder="请选择项目分类"
                      v-model="models.projectClass"
                      :filterable="false"
                      clearable
                      value=""
                    >
                      <el-option
                        v-for="(item, index) in [{label:'非限制',value:1},{label:'限制类',value:2}]"
                        :value="item.value"
                        :key="index"
                        :label="item.label"
                      />

                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="申请科室"
                    prop="applyDeptId"
                  >
                    <el-select
                      :style="{width:'100%'}"
                      placeholder="请选择科室"
                      v-model="models.applyDeptId"
                      :filterable="false"
                      clearable
                      @change="handleChange"
                      value=""
                    >
                      <el-option
                        v-for="(item, index) in structureList"
                        :value="item.id"
                        :key="item.id"
                        :label="item.depName"
                      />

                    </el-select>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="技术类别"
                    prop="techType"
                    label-width="130px"
                  >
                    <el-select
                      :style="{width:'100%'}"
                      placeholder="请选择项目分类"
                      v-model="models.techType"
                      :filterable="false"
                      clearable
                      value=""
                    >
                      <el-option
                        v-for="(item, index) in [{label:'手术操作',value:1},{label:'检验检查',value:2},{label:'其他治疗技术',value:3}]"
                        :value="item.value"
                        :key="index"
                        :label="item.label"
                      />

                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="科室负责人"
                    prop="applyManagerName"
                  >
                    <el-input
                      :style="{width:'100%'}"
                      placeholder="自动带入"
                      v-model="models.applyManagerName"
                      disabled
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="填报人姓名"
                    prop="applyUserName"
                    label-width="130px"
                  >
                    <el-input
                      :style="{width:'100%'}"
                      placeholder="请输入填报人姓名"
                      v-model="models.applyUserName"
                      disabled
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="填报人工号"
                    prop="workNumber"
                  >
                    <el-input
                      :style="{width:'100%'}"
                      placeholder="请输入工号"
                      v-model="models.workNumber"
                      disabled
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="完成填报时间"
                    prop="fillTime"
                    label-width="130px"
                  >
                    <el-input
                      :style="{width:'100%'}"
                      placeholder="请输入项目名称"
                      v-model="models.fillTime"
                      disabled
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="设备或试剂"
                    prop="equipmentReagentsExist"
                  >
                    <el-radio-group
                      v-model="models.equipmentReagentsExist"
                      :style="{ width: 130 }"
                    >
                      <el-radio
                        v-for="(item, index) in [{label:'有',value:1},{label:'无',value:0}]"
                        :key="index"
                        class="incat-radio incat-mini"
                        :style="{display: 'inline-block'}"
                        :label="item.value"
                      >
                        <template>{{ item.label }}</template>
                      </el-radio>
                    </el-radio-group>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="16"
                >
                  <el-form-item
                    label="备注"
                    prop="remark"
                    label-width="130px"
                  >
                    <el-input
                      type="textarea"
                      :rows="3"
                      placeholder="请输入项目名称"
                      v-model="models.remark"
                      :style="{ width: '62%' }"
                    >

                    </el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="16"
                >
                  <el-form-item
                    label="申请书"
                    prop="applyDocs"
                    label-width="130px"
                  >
                    <FileUpload :element="uploadConfig" :data-model="models.applyDocs&&JSON.parse(models.applyDocs)" :preview="false" @fileList="fileList" />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="16"
                >
                  <el-form-item
                    label="设备三证"
                    prop="deviceDocs"
                    label-width="130px"
                  >
                    <FileUpload :element="uploadConfig" :data-model="models.deviceDocs&&JSON.parse(models.deviceDocs)" :preview="false" @fileList="fileList1" />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="16"
                >
                  <el-form-item
                    label="设备三证为"
                    label-width="130px"
                  >
                    <span>*</span>
                    <span
                      style="{'font-size':'15px','font-weight':'500',color:'#606266'}"
                    >
                    《医疗器械生产企业许可证》、《医疗器械注册证》和《医疗器械经营企业许可证》。
                  </span>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="16"
                >
                  <el-form-item
                    label="补充资料"
                    prop="additionalDocs"
                    label-width="100px"
                  >
                    <FileUpload :element="uploadConfig" :data-model="models.additionalDocs&&JSON.parse(models.additionalDocs)" :preview="false" @fileList="fileList2" />
                  </el-form-item>
                </el-col>
              </el-row>

            </el-form>
          </el-card>

        </div>
      </div>
    </el-dialog>
    <LeaderDialog ref="leaderRef" @selectLeader="selectLeader" />
  </div>
</template>

<script>
import Vue from 'vue'
import { GenerateForm } from '@/components/VueFormMaking'
import 'form-making/dist/FormMaking.css'
Vue.component(GenerateForm.name, GenerateForm)
import LimitTech from './limitTech/index.vue'
import LeaderDialog from './leader/index.vue'
import Tech from './tech/index.vue'
import {
  processStructure,
  createWorkOrder,
  draftWorkOrder,
  updateWorkOrder,
  recallWorkOrder, newCreateWorkOrder, newDoUpdate
} from '@/api/xjs/work-order'
import {listAllUser, newListUser} from '@/api/system/sysuser'
import {getNewDeptInfo, getNewDeptList, getOrdinaryDeptList, newGetUserList, newTreeselect} from '@/api/system/dept'
import { mapGetters } from 'vuex'
import printJS from 'print-js'
import FileUpload from "@/components/VueFormMaking/components/Upload/file.vue";
import {newGetUserInfo} from "@/api/user";
export default {
  name: 'ApplyDialog',
  components: {
    FileUpload,
    LimitTech,
    Tech,
    LeaderDialog
  },
  props: {
    value: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      uploadConfig:{
        options:{
          // action: "http://192.168.0.107:8002/api/v1/public/uploadFile?file_type=files"
          defaultValue:[],
          disabled:false,
          length:9,
          tip:'',
          width:'30%'
        }
      },
      structureList:[],
      structureUserList:[],
      models: {

      },
      printData: {
        printable: 'printFrom',
        header: '',
        ignore: ['no-print']
      },
      workOrdeInfo: {
        id: null,
        status: 1
      },
      limitTechList: [],
      selectLimitData: [],
      loading: false,
      dialogVisible: false,
      limitTechVisible: false,
      submitDisabled: false,
      draftDisabled: false,
      recallDisabled: false,
      downloadVisible: false,
      active: 0,
      total: 0,
      processStructureValue: {},
      queryParams: {
        pageIndex: 1,
        pageSize: 5,
        name: undefined
      },
      tpls: [],
      newTpls: [],
      ruleForm: {
        workOrderId: 0,
        title: '',
        projectNo: '',
        process: '',
        classify: '',
        state: [],
        source: '',
        source_state: '',
        process_method: '',
        tpls: {
          form_structure: [],
          form_data: []
        },
        newTpls: {},
        tasks: [],
        status: 0
      },
      rules: {
        name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
        projectNo: [{ required: true, message: '请输入项目编号', trigger: 'blur' }],
        projectClass: [{ required: true, message: '请选择项目分类', trigger: 'blur' }],
        applyDeptId: [{ required: true, message: '请选择科室', trigger: 'blur' }],
        techType: [{ required: true, message: '请选择技术类型', trigger: 'blur' }],
        equipmentReagentsExist: [{ required: true, message: '请选择设备或试剂', trigger: 'blur' }],
        // applyDocs: [{ required: true, message: '请上传申请书', trigger: 'blur' }],
        // deviceDocs: [{ required: true, message: '请上传设备三证', trigger: 'blur' }],
      },
      processId: null,
      remoteFunc: {
        // 获取用户列表
        async userList(resolve) {
          const res = await listAllUser({})
          const options = res.data
          resolve(options)
        },
        async deptTreeList(resolve) {
          const res = await getOrdinaryDeptList()
          resolve(res.data)
        }
      }
    }
  },
  computed: {
    ...mapGetters(['name','newUserInfo']),
    orderState() {
      if (this.workOrdeInfo.id != null) {
        if (this.workOrdeInfo.status == 1) {
          return '未提交(草稿)'
        } else {
          return `${this.workOrdeInfo.current_state_name}【${
            this.workOrdeInfo.principals
          }】`
        }
      } else {
        return '未提交'
      }
    }
  },
  methods: {
    fileList(files) {
      this.models.applyDocs = JSON.stringify(files)
    },
    fileList1(files) {
      this.models.deviceDocs = JSON.stringify(files)
    },
    fileList2(files) {
      this.models.additionalDocs = JSON.stringify(files)
    },
    getNewDeptListManager(v){
      // console.log(1111,v)
      getNewDeptList({pageSize:1}).then(response => {
        // console.log(2323,response)
        this.structureUserList = response.records;
      })
    },
    getNewDeptTreeList() {
      newTreeselect().then(response => {
        console.log(1122,response.records[0].level)
        this.structureList = response.records[0].level
        // this.deptOptions = response.data
      })
    },
    downLoadDoc(type) {
      var a = document.createElement('a')
      switch (type) {
        case 1:
          a.href =
            '/static/xjs/非限制类使用——甘肃省人民医院医疗技术临床应用审核申请书（操作技术）.docx'
          a.download =
            '非限制类使用——甘肃省人民医院医疗技术临床应用审核申请书（操作技术）.docx'
          break
        case 2:
          a.href =
            '/static/xjs/非限制类使用——甘肃省人民医院医疗技术临床应用审核申请书（检验检查）.docx'
          a.download =
            '非限制类使用——甘肃省人民医院医疗技术临床应用审核申请书（检验检查）.docx'
          break
        case 3:
          a.href = '/static/xjs/限制类备案使用——新技术备案申请表（样表）.docx'
          a.download = '限制类备案使用——新技术备案申请表（样表）.docx'
          break
        case 4:
          a.href = '/static/xjs/限制类备案使用——新技术备案申请表（样表）.docx'
          a.download = '限制类备案使用——新技术备案申请表（样表）.docx'
          break
        case 5:
          a.href = '/static/xjs/限制类备案使用——新技术备案申请表（样表）.docx'
          a.download = '限制类备案使用——新技术备案申请表（样表）.docx'
          break
      }
      a.style.display = 'none'
      document.body.appendChild(a)
      a.click()
      a.remove()
    },
    openHelp() {
      this.$refs.Tech.close()
      this.$refs.LimitTech.open()
    },
    openTech() {
      this.$refs.LimitTech.close()
      this.$refs.Tech.open()
    },
    handleChange(v){
      getNewDeptInfo({id:v}).then(res=>{
        this.models.applyManagerName = res.records[0].deptManagerName
      })
    },
    handlePrint(params) {
      printJS({
        maxWidth: 1920,
        documentTitle: '甘肃省人民医院医务一网通办',
        printable: params.printable, // 'printFrom',
        type: params.type || 'html',
        header: params.header, // '表单',
        targetStyles: ['*'],
        ignoreElements: params.ignore || [], // ['no-print']
        properties: params.properties || null
      })
    },
    handleClose(val) {
      this.dialogVisible = false
      this.$refs['ruleForm'].resetFields()
      this.$emit('refreshTable')
    },
    open(row) {
      console.log("列表数据",row)
      Promise.all([newGetUserInfo(),getNewDeptList({pageSize:9999})]).then(resArr=>{
        const [userInfoData,deptData] = resArr
        this.models.applyUserName = userInfoData.records[0].name
        this.models.workNumber  = userInfoData.records[0].empNo
        this.structureList = deptData.records
        this.models = row
        // this.models.applyManagerName = mangerData.records[0].deptManagerName
        this.dialogVisible = true
      })

    },
    handleLeader() {
      this.$refs.leaderRef.handleInversion()
    },
    getProcessNodeList(row) {
      this.models = row
      this.dialogVisible = true
      /*processStructure({
        processId: this.processId,
        workOrderId: this.ruleForm.workOrderId
      }).then(response => {
        this.processStructureValue = response.data
        this.newTpls = response.data.tpls
        this.currentNode = this.processStructureValue.nodes[0]
        console.log(this.currentNode)
        this.dialogVisible = true
      })*/
    },
    draftAction(item) {
      if(this.workOrdeInfo.id){
        this.models.id = this.workOrdeInfo.id
      }
      newCreateWorkOrder(this.models).then((res)=>{
        this.$message({
          type: 'success',
          message: '提交成功!'
        })
        if(!this.workOrdeInfo.id){
          this.workOrdeInfo.id = res.records[0].id
        }
        this.auditStatus = 1
        this.draftDisabled = false
        // this.$router.push({ path: '/project/applyList' })
      })
      /*this.draftDisabled = true
      var stateMap = {}
      this.ruleForm.process = this.processId
      this.ruleForm.status = 1
      this.ruleForm.classify = this.processStructureValue.process.classify
      stateMap['id'] = item.target
      this.ruleForm.source_state = this.processStructureValue.nodes[
        this.active
      ].label

      for (var v of this.processStructureValue.nodes) {
        if (v.id === item.target) {
          if (v.assignType !== undefined) {
            stateMap['process_method'] = v.assignType
          }
          if (v.assignValue !== undefined) {
            stateMap['processor'] = Array.from(new Set(v.assignValue))
          }
          stateMap['label'] = v.label
          stateMap['desc'] = v.desc
          break
        }
      }
      this.ruleForm.state = [stateMap]

      this.ruleForm.tpls = {
        form_name: [],
        form_structure: [],
        form_data: []
      }

      var promiseList = []

      this.tpls = []
      for (var tpl of this.newTpls) {
        this.tpls.push({
          tplDataId: tpl.id,
          tplId: tpl.form_structure.id
        })
      }

      for (var tpl of this.processStructureValue.tpls) {
        // tpl.form_structure.id = tpl.id;
        this.ruleForm.tpls.form_structure.push(tpl.form_structure)
        this.ruleForm.tpls.form_name.push(tpl.form_name)
        promiseList.push(
          this.$refs['generateForm-' + tpl.id][0].getDataNoValidate()
        )
      }

      Promise.all(promiseList)
        .then(values => {
          this.ruleForm.source = this.processStructureValue.nodes[
            this.active
          ].id
          console.log(values)
          for (var item of values) {
            if (item.hasOwnProperty('project_name')) {
              this.ruleForm.title = item.project_name
            }
          }
          if (this.tpls.length > 0) {
            for (var tplDataIndex in this.tpls) {
              this.tpls[tplDataIndex].tplValue = values[tplDataIndex]
            }
            this.ruleForm.newTpls = this.tpls
          }

          this.ruleForm.tpls.form_data = values
          this.ruleForm.is_exec_task = item.isExecuteTask
          draftWorkOrder(this.ruleForm)
            .then(response => {
              if (response.code === 200) {
                console.log(response)
                this.$message({
                  type: 'success',
                  message: '暂存成功!'
                })
                this.workOrdeInfo = response.data.workOrder
                this.ruleForm.workOrderId = this.workOrdeInfo.id
                this.newTpls = response.data.tpls
                this.draftDisabled = false
                console.log(this.processStructureValue.tpls)
              }
            })
            .catch(() => {
              this.draftDisabled = false
            })
        })
        .catch(() => {
          this.draftDisabled = false
        })*/
    },

    selectLeader(userId) {
      this.ruleForm.state[0]['processor'] = [userId]
      updateWorkOrder(this.ruleForm)
        .then(response => {
          if (response.code === 200) {
            this.$message({
              type: 'success',
              message: '提交成功!'
            })
            this.workOrdeInfo = response.data.workOrder
            this.ruleForm.workOrderId = this.workOrdeInfo.id
            this.handleClose()
            // this.$router.push({ path: "/project/applyList" });
            // this.$router.push({ path: "/process/upcoming" });
          }
        })
        .catch(() => {
          this.submitDisabled = false
        })
    },
    recallOrder() {
      this.recallDisabled = true
      const recallParams = {
        work_oroder_id: this.workOrdeInfo.id,
        process_id: this.workOrdeInfo.process
      }
      recallWorkOrder(recallParams)
        .then(response => {
          if (response.code === 200) {
            this.$message({
              type: 'success',
              message: '撤回成功!'
            })
            this.workOrdeInfo = response.data.workOrder
            this.ruleForm.workOrderId = this.workOrdeInfo.id
            this.recallDisabled = false
            this.submitDisabled = false
            this.recallStatus = 1
            // this.$router.push({ path: "/process/upcoming" });
          }
        })
        .catch(() => {
          this.submitDisabled = false
          this.recallDisabled = false
        })
    },
    submitAction() {
      this.$refs['generateForm'].validate(valid => {
        if(valid){
          const loading = this.$loading({
            lock: true,
            text: 'Loading',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)'
          });
          newDoUpdate({id:this.workOrdeInfo.id||this.models.id}).then(res=>{

            // console.log("提交",res)

            this.$message({
              type: 'success',
              message: '提交成功!'
            })
            // this.auditStatus = 2
            this.submitDisabled = false
            this.handleClose()
            loading.close()
          })
        }
      })
      /*newCreateWorkOrder(this.models).then((res)=>{
        const id = res.records[0].id;
        newDoUpdate({id}).then(res=>{

          console.log("提交",res)

          this.$message({
            type: 'success',
            message: '提交成功!'
          })
          // this.auditStatus = 2
          this.submitDisabled = false
          this.handleClose()

        })

      })*/
      /*this.$refs['ruleForm'].validate(valid => {
        if (valid) {
          this.submitDisabled = true
          var stateMap = {}
          this.ruleForm.process = this.processId
          this.ruleForm.status = 0
          this.ruleForm.classify = this.processStructureValue.process.classify
          stateMap['id'] = item.target
          this.ruleForm.source_state = this.processStructureValue.nodes[
            this.active
          ].label
          for (var v of this.processStructureValue.nodes) {
            if (v.id === item.target) {
              if (v.assignType !== undefined) {
                stateMap['process_method'] = v.assignType
              }
              if (v.assignValue !== undefined) {
                stateMap['processor'] = Array.from(new Set(v.assignValue))
              }
              stateMap['label'] = v.label
              stateMap['desc'] = v.desc
              break
            }
          }
          this.ruleForm.state = [stateMap]

          this.ruleForm.tpls = {
            form_name: [],
            form_structure: [],
            form_data: []
          }

          var promiseList = []

          this.tpls = []
          for (var tpl of this.newTpls) {
            this.tpls.push({
              tplDataId: tpl.id,
              tplId: tpl.form_structure.id
            })
          }

          for (var tpl of this.processStructureValue.tpls) {
            // tpl.form_structure.id = tpl.id;
            this.ruleForm.tpls.form_structure.push(tpl.form_structure)
            this.ruleForm.tpls.form_name.push(tpl.form_name)
            promiseList.push(this.$refs['generateForm-' + tpl.id][0].getData())
          }
          Promise.all(promiseList)
            .then(values => {
              this.ruleForm.source = this.processStructureValue.nodes[
                this.active
              ].id
              let leadId = 0
              for (var item of values) {
                if (item.hasOwnProperty('project_name')) {
                  this.ruleForm.title = item.project_name
                }
                if (item.hasOwnProperty('leader_name')) {
                  leadId = item.leader_name
                }
              }
              if (this.tpls.length > 0) {
                for (var tplDataIndex in this.tpls) {
                  this.tpls[tplDataIndex].tplValue = values[tplDataIndex]
                }
                this.ruleForm.newTpls = this.tpls
              }
              this.ruleForm.tpls.form_data = values
              this.ruleForm.is_exec_task = item.isExecuteTask

              // this.handleLeader();
              this.selectLeader(leadId)
              this.submitDisabled = false
            })
            .catch(() => {
              this.submitDisabled = false
            })
        }
      })*/
    }
  }
}
</script>

<style lang="scss" scoped>
/* 去掉全选按钮 */
::v-deep .el-table .disabledCheck .cell .el-checkbox__inner {
    display: none !important;
}

::v-deep .el-table .disabledCheck .cell::before {
    content: "请选择";
    text-align: center;
    line-height: 37px;
}
.app-container {
    max-width: 1530px;
    margin: 0 auto;
    background: #ebf4fa;
    border-radius: 12px;
    .apply-box {
        border-radius: 15px;
        .line {
            height: 22px;
            width: 5px;
            background: #277fd6;
        }
    }
}
</style>
